// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import VueResource from "vue-resource";
import VueAwesomeSwiper from "vue-awesome-swiper";
// 解决移动端300ms延迟问题
import FastClick from "fastclick";
import App from "./App";
import router from "./router";
import Filters from "./filters/filters";

document.addEventListener("DOMContentLoaded", () => {
  FastClick.attach(document.body);
});
Vue.config.productionTip = false;
Vue.use(VueResource);
// 注册轮播插件
Vue.use(VueAwesomeSwiper);

// 注册全局过滤器
Object.keys(Filters).forEach(key => {
  Vue.filter(key, Filters[key]);
});

/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  components: { App },
  template: "<App/>"
});
